<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>idautils</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar"
        href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar"
        href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar"
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center">
            <p class="nomargin">
              http://www.d-dome.net/idapython
      </p></th></tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Module&nbsp;idautils
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript: void(0);" class="privatelink"
    onclick="toggle_private();">hide private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="idautils-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h2 class="module">Module idautils
<br/><span class="codelink"><a href="idautils-pysrc.html">source&nbsp;code</a></span></h2>
idautils.py - High level utility functions for IDA<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <td colspan="2">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <th align="left" class="summary">Functions</th>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#refs" class="sig-name">refs</a>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">funcfirst</span>,
        <span class="sig-arg">funcnext</span>)</span>
    <br />Generic reference collector - INTERNAL USE ONLY.
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#CodeRefsTo" class="sig-name">CodeRefsTo</a>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">flow</span>)</span>
    <br />Get a list of code references to 'ea'
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#CodeRefsFrom" class="sig-name">CodeRefsFrom</a>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">flow</span>)</span>
    <br />Get a list of code references from 'ea'
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#DataRefsTo" class="sig-name">DataRefsTo</a>(<span class="sig-arg">ea</span>)</span>
    <br />Get a list of data references to 'ea'
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#DataRefsFrom" class="sig-name">DataRefsFrom</a>(<span class="sig-arg">ea</span>)</span>
    <br />Get a list of data references from 'ea'
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#Heads" class="sig-name">Heads</a>(<span class="sig-arg">start</span>,
        <span class="sig-arg">end</span>)</span>
    <br />Get a list of heads (instructions or data)
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#Functions" class="sig-name">Functions</a>(<span class="sig-arg">start</span>,
        <span class="sig-arg">end</span>)</span>
    <br />Get a list of functions
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#Segments" class="sig-name">Segments</a>()</span>
    <br />Get list of segments (sections) in the binary image
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#GetDataList" class="sig-name">GetDataList</a>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">count</span>,
        <span class="sig-arg">itemsize</span>=<span class="sig-default">1</span>)</span>
    <br />Get data list - INTERNAL USE ONLY
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#PutDataList" class="sig-name">PutDataList</a>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">list</span>,
        <span class="sig-arg">itemsize</span>=<span class="sig-default">1</span>)</span>
    <br />Put data list - INTERNAL USE ONLY
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="rtype">
    &nbsp;
   </td>
  <td>
    <span class="sig"><a href="idautils-module.html#MapDataList" class="sig-name">MapDataList</a>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">length</span>,
        <span class="sig-arg">func</span>,
        <span class="sig-arg">wordsize</span>=<span class="sig-default">1</span>)</span>
    <br />Map through a list of data words in the database
  </td>
</tr>
</table>

<br />
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <td colspan="2">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <th align="left" class="details">Function Details</th>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="refs"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">refs</span>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">funcfirst</span>,
        <span class="sig-arg">funcnext</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#refs">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Generic reference collector - INTERNAL USE ONLY.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>
</div>
<a name="CodeRefsTo"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">CodeRefsTo</span>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">flow</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#CodeRefsTo">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get a list of code references to 'ea'
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul>
        <li><strong class="pname"><code>ea</code></strong> - Target address</li>
        <li><strong class="pname"><code>flow</code></strong> (<code>Boolean (0/1, False/True)</code>) - Follow normal code flow or not</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd><p>list of references (may be empty list)</p>
          Example:
<pre class="literalblock">
       for ref in CodeRefsTo(ScreenEA(), 1):
               print ref
</pre></dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="CodeRefsFrom"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">CodeRefsFrom</span>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">flow</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#CodeRefsFrom">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get a list of code references from 'ea'
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul>
        <li><strong class="pname"><code>ea</code></strong> - Target address</li>
        <li><strong class="pname"><code>flow</code></strong> (<code>Boolean (0/1, False/True)</code>) - Follow normal code flow or not</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd><p>list of references (may be empty list)</p>
          Example:
<pre class="literalblock">
       for ref in CodeRefsFrom(ScreenEA(), 1):
               print ref
</pre></dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="DataRefsTo"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">DataRefsTo</span>(<span class="sig-arg">ea</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#DataRefsTo">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get a list of data references to 'ea'
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul>
        <li><strong class="pname"><code>ea</code></strong> - Target address</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd><p>list of references (may be empty list)</p>
          Example:
<pre class="literalblock">
       for ref in DataRefsTo(ScreenEA(), 1):
               print ref
</pre></dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="DataRefsFrom"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">DataRefsFrom</span>(<span class="sig-arg">ea</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#DataRefsFrom">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get a list of data references from 'ea'
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul>
        <li><strong class="pname"><code>ea</code></strong> - Target address</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd><p>list of references (may be empty list)</p>
          Example:
<pre class="literalblock">
       for ref in DataRefsFrom(ScreenEA(), 1):
               print ref
</pre></dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="Heads"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">Heads</span>(<span class="sig-arg">start</span>,
        <span class="sig-arg">end</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#Heads">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get a list of heads (instructions or data)
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul>
        <li><strong class="pname"><code>start</code></strong> - start address (this one is always included)</li>
        <li><strong class="pname"><code>end</code></strong> - end address</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd>list of heads between start and end</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="Functions"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">Functions</span>(<span class="sig-arg">start</span>,
        <span class="sig-arg">end</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#Functions">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get a list of functions
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul>
        <li><strong class="pname"><code>start</code></strong> - start address</li>
        <li><strong class="pname"><code>end</code></strong> - end address</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd>list of heads between start and end</dd></dl>
      <p><strong>Note:</strong>
        The last function that starts before 'end' is included even if 
        it extends beyond 'end'.
      </p>
      </ul>
  </dd></dl>
</td></tr></table>
</div>
<a name="Segments"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">Segments</span>()</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#Segments">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get list of segments (sections) in the binary image
  <dl><dt></dt><dd>
    <dl><dt>Returns:</dt>
        <dd>List of segment start addresses.</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="GetDataList"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">GetDataList</span>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">count</span>,
        <span class="sig-arg">itemsize</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#GetDataList">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Get data list - INTERNAL USE ONLY
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>
</div>
<a name="PutDataList"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">PutDataList</span>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">list</span>,
        <span class="sig-arg">itemsize</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#PutDataList">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Put data list - INTERNAL USE ONLY
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>
</div>
<a name="MapDataList"></a>
<div>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3><span class="sig"><span class="sig-name">MapDataList</span>(<span class="sig-arg">ea</span>,
        <span class="sig-arg">length</span>,
        <span class="sig-arg">func</span>,
        <span class="sig-arg">wordsize</span>=<span class="sig-default">1</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="idautils-pysrc.html#MapDataList">source&nbsp;code</a></span>&nbsp;</span
    ></td>
  </table>
  
  Map through a list of data words in the database
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul>
        <li><strong class="pname"><code>ea</code></strong> - start address</li>
        <li><strong class="pname"><code>length</code></strong> - number of words to map</li>
        <li><strong class="pname"><code>func</code></strong> - mapping function</li>
        <li><strong class="pname"><code>wordsize</code></strong> - size of words to map [default: 1 byte]</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd>None</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar"
        href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar"
        href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar"
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center">
            <p class="nomargin">
              http://www.d-dome.net/idapython
      </p></th></tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">Generated by Epydoc
        3.0alpha2 on Tue Mar 27 17:02:06 2007</td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sf.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
